#include <stdio.h>
int main()
{
    int t;
    scanf("%d",&t);
    while (t--)
    {
        int i,n,m,min=100;
        scanf("%d%d",&n,&m);
        for (i=0;i<n;i++)
        {
            scanf("%d",&m);
            if (min>m)min=m;
        }
        printf("%d\n",(100-min)*(100-min));
    }
    return 0;
}
